<template>
  <div class="info">
    <div class="cov">
      <div class="title">
        病毒信息
        <a :href="news">
          查看更多<img class="icon" src="../assets/images/moreb.png" alt="">
        </a>
      </div>
      <p>{{covDesc.note1}}</p>
      <p>{{covDesc.note2}}</p>
      <p>{{covDesc.note3}}</p>
      <p>{{covDesc.note4}}</p>
      <p>{{covDesc.remark1}}</p>
      <p>{{covDesc.remark2}}</p>
      <p>{{covDesc.remark3}}</p>
    </div>
    <div class="hot">
      <div class="title">
        <img class="rdImg" src="../assets/images/疫情热点.png" alt="疫情热点">
        <a :href="news">
          查看更多<img class="icon" src="../assets/images/moreb.png" alt="">
        </a>
      </div>
      <ul>
        <li v-for="item in covDesc.news" :key="item.id">
          <a :href="item.sourceUrl">
            <span>最新</span>{{item.title}}
          </a>
          <a :href="item.sourceUrl">
            <img class="icon" src="../assets/images/more.png" alt="">
          </a>
        </li>
      </ul>
    </div>
    <div class="bot"></div>
  </div>
</template>

<script>
  import base from '../api/base'

  export default {
    name: 'CovInfo',
    props: {
      covDesc: {
        type: Object
      }
    },
    setup() {
      const news = base.cctvNews

      return {
        news
      }
    }
  }
</script>
<style lang="less" scoped>
  .info {
    font-size: 0.33rem;
    padding: 0.2rem;
    .title {
      border-left: 0.1rem solid rgba(20, 49, 128);
      padding-left: 0.1rem;
      margin-bottom: 0.2rem;
      display: flex;
      justify-content: space-between;
      a {
        font-family: "微软雅黑",Arial, Helvetica, sans-serif;
        color: #3366ff;
        display: flex;
        align-items: center;
      }
    }
    p {
      line-height: 0.5rem;
      color: #666;
    }
  }

  .hot {
    margin-top: 0.3rem;
    .rdImg {
      width: 1.4rem;
    }
    ul {
      margin-top: -0.1rem;
      text-indent: 0.1rem;
      li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        line-height: 0.8rem;
        letter-spacing: 0.02rem;
        span {
          margin: 0.03rem 0.06rem 0 0;
          height: 0.16rem;
          padding: 0.02rem;
          text-align: center;
          font-size: 0.11rem;
          font-weight: 500;
          color: #fff;
          background-color: #f74c31;
          border-radius: 0.02rem;
          vertical-align: top;
        }
      }
    }
  }

  .bot {
    height: 0.15rem;
    width: 100%;
    border-bottom: 0.01rem solid #dcdcdc;
  }

  .icon {
    width: 0.2rem;
  }
</style>